<template>
  <van-nav-bar
    title="文档管理"
    left-text="返回"
    left-arrow
    fixed
    @click-left="historyBack"
  />
  <van-collapse v-model="data.activeNames">
    <van-collapse-item
      v-for="(item, index) in data.collapseItem"
      :key="index"
      :title="item.title"
      :name="index"
      icon="orders-o"
    >
      网址：<a class="href" :href="item.content">{{ item.content }}</a>
    </van-collapse-item>
  </van-collapse>
</template>
<script>
import { reactive, computed } from 'vue'
import { useStore } from 'vuex'
import { historyBack } from '@/utils/index'
export default {
  setup() {
    const store = useStore()
    const data = reactive({
      activeNames: [],
      collapseItem: computed(() => store.state.docArr),
    })
    return {
      data,
      historyBack,
    }
  },
}
</script>
<style lang="scss" scoped>
.href {
  word-break: break-all;
}
</style>
